home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10641 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: newshost.cyberramp.net!news
  2. From: sinan@cyberramp.net (John Noland)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Invalid Indirection???
  5. Date: 19 Mar 1996 02:37:41 GMT
  6. Organization: Prose Software
  7. Message-ID: <4il6ll$760@newshost.cyberramp.net>
  8. References: <4i7cck$t67@infa.central.susx.ac.uk> <4iah9k$r02@newshost.cyberramp.net> <826906075snz@genesis.demon.co.uk>
  9. NNTP-Posting-Host: ramp3-11.cyberramp.net
  10. X-Newsreader: WinVN 0.99.5
  11.  
  12. In article <826906075snz@genesis.demon.co.uk>, fred@genesis.demon.co.uk says...
  13.  
  14. >>tmp = ((tempi[i]_*_tempj[i]) + (tempi[i+1]_*_tempj[i+1]))
  15. >
  16. >The white-space here makes no difference at all and woule elicit the same
  17. >error from the compiler. You also need a ; at the end of the statement.
  18. >As an observation none of the parentheses in that expression are required.
  19. >
  20.  
  21. I did misdiagnose the gentleman's problem. He didn't declare tempi as an 
  22. array. My mistake. I should have looked at his code more carefully, instead
  23. of just looking at the line with the error. 
  24.  
  25. Tanmoy B. bashed me with this:
  26. > that it can have `lexical conventions for the evaluation of tokens'
  27. > whatever that garbage is?
  28.  
  29. Most compilers come with a special book or file. It's usually called a 
  30. Reference Manual or Reference Guide or Technical Reference or something
  31. to that effect. In this book there is usually section called 'Lexical 
  32. Conventions' or 'Lexical Elements' or 'Tokens' or 'The Evaluation of Tokens'. 
  33. In K&R there is a section of the appendix named 'Lexical Conventions' which 
  34. I consulted prior to answering the question. My suggestion was for the man 
  35. to consult this resource for his particular compiler. I knew when I answered 
  36. the question that my answer wouldn't be correct for any of the C compilers
  37. that I've used, I thought, mistakenly, that this aspect of the C language
  38. might be open to interpretation for the compiler writer and maybe his compiler
  39. did things differently. I guess I'm just not used to this ANSI compliance 
  40. stuff yet. I'm glad C is finally standardized, though.
  41.  
  42. -John
  43.  
  44.